﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Engine;
using NumericalCalculations;
using QLabValues;
using AtomicTypes;
using ParserCore;

namespace TestEngine
{
    [TestClass]
    public class EngineFunctionsTest
    {
        [TestMethod]
        public void FunctionsTestMethod()
        {
            EngineFunctions ef = new EngineFunctions();
            ef.AddFunctions();


            #region Accumarray

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                
                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, true);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(2), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));

            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, true);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QBooleanNDimArray(new QBoolean[] { new QBoolean(true), new QBoolean(true), new QBoolean(true), new QBoolean(true) }, 1, 4));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(2), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));

                args.RemoveAt(1);
                output.Clear();

                args.Add(new QCharNDimArray(new QChar[] { new QChar('a'), new QChar('b'), new QChar('c'), new QChar('d') }, 4, 1));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(195), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(100), new QFloat64(0), new QFloat64(0), new QFloat64(99), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));

                args.RemoveAt(1);
                output.Clear();

                args.Add(new QInt64NDimArray(new QInt64[] { new QInt64(1), new QInt64(1), new QInt64(1), new QInt64(1) }, 4, 1));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(2), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));

                args.RemoveAt(1);
                output.Clear();

                args.Add(new QUInt64NDimArray(new QUInt64[] { new QUInt64(1), new QUInt64(1), new QUInt64(1), new QUInt64(1) }, 4, 1));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(2), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, false);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray());
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(2), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, false);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(3), new QFloat64(3), new QFloat64(3), new QFloat64(3) }, 1, 4));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(2), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, true);
            }
            
            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(2)}, 1, 3));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(2), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, true);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(3), new QFloat64(3) }, 1, 3));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(2), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(0) }, 2, 3, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));

                args.RemoveAt(2);
                output.Clear();

                args.Add(new QFloat64NDimArray());
                args.Add(new QFunctionHandle(new Identifier("prod")));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, false);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray());
                args.Add(new QFunctionHandle(new Identifier("#%xyzFunkcija%#")));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, true);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray());
                args.Add(new QFunctionHandle(new Identifier("prod")));
                args.Add(new QBooleanNDimArray(new QBoolean[] { new QBoolean(true) }, 1, 1));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, true);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray());
                args.Add(new QFunctionHandle(new Identifier("prod")));
                args.Add(new QBooleanNDimArray(new QBoolean[] { new QBoolean(true), new QBoolean(true) }, 1, 2));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(0), new QFloat64(0), 
                                                        new QFloat64(0), new QFloat64(1), new QFloat64(0), new QFloat64(0), new QFloat64(1), new QFloat64(0) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, true);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray());
                args.Add(new QFunctionHandle(new Identifier("prod")));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5) }, 1, 1));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(5), new QFloat64(5), 
                                                        new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(1), new QFloat64(5) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, false);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray());
                args.Add(new QFunctionHandle(new Identifier("prod")));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5) }, 1, 1));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5) }, 1, 1));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(5), new QFloat64(5), 
                                                        new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(1), new QFloat64(5) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, true);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray());
                args.Add(new QFunctionHandle(new Identifier("prod")));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5) }, 1, 1));
                args.Add(new QBooleanNDimArray(new QBoolean[] { new QBoolean(true) }, 1, 1));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(5), new QFloat64(5), 
                                                        new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(1), new QFloat64(5) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, true);
            }
            catch (Exception ex)
            {
                Assert.AreEqual(true, true);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray());
                args.Add(new QFunctionHandle(new Identifier("prod")));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5) }, 1, 1));
                args.Add(new QBooleanNDimArray(new QBoolean[] { new QBoolean(false), new QBoolean(true) }, 1, 2));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(5), new QFloat64(5), 
                                                        new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(1), new QFloat64(5) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, true);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray());
                args.Add(new QFunctionHandle(new Identifier("prod")));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5) }, 1, 1));
                args.Add(new QBooleanNDimArray(new QBoolean[] { new QBoolean(false) }, 1, 1));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(5), new QFloat64(5), 
                                                        new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(1), new QFloat64(5) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, false);
            }

            try
            {
                List<IQLabValue> args = new List<IQLabValue>();
                List<IQLabValue> output = new List<IQLabValue>();
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(2), new QFloat64(1), new QFloat64(1), 
                                                        new QFloat64(2), new QFloat64(2), new QFloat64(1), new QFloat64(1), new QFloat64(3), new QFloat64(2) }, 4, 3));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(1), new QFloat64(1), new QFloat64(1), new QFloat64(1) }, 1, 4));
                args.Add(new QFloat64NDimArray());
                args.Add(new QFunctionHandle(new Identifier("prod")));
                args.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5) }, 1, 1));
                args.Add(new QBooleanNDimArray(new QBoolean[] { new QBoolean(false) }, 1, 1));
                args.Add(new QBooleanNDimArray(new QBoolean[] { new QBoolean(false) }, 1, 1));
                output.Add(new QFloat64NDimArray(new QFloat64[] { new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(5), new QFloat64(5), 
                                                        new QFloat64(5), new QFloat64(1), new QFloat64(5), new QFloat64(5), new QFloat64(1), new QFloat64(5) }, 2, 2, 3));

                Assert.AreEqual(true, Helper.areIQlabValueListsEqual(output, ef.accumarray(args)));
            }
            catch (NumericalCalculationsException ex)
            {
                Assert.AreEqual(true, true);
            }

            #endregion
        }
    }
}
